﻿Imports System.IO

Namespace EyeOpen.IO

	Friend Class DirectoryInfoWrapper
		Implements IDirectoryInfo
		Private ReadOnly directory As DirectoryInfo

		Public Sub New(ByVal directory As DirectoryInfo)
			Me.directory = directory
		End Sub

		Public ReadOnly Property FullName() As String Implements IDirectoryInfo.FullName
			Get
				Return directory.FullName
			End Get
		End Property

		Public Function GetFiles(ByVal fileName As String) As IEnumerable(Of FileInfo) Implements IDirectoryInfo.GetFiles
			Return directory.GetFiles(fileName)
		End Function

		Public Function GetDirectories() As IEnumerable(Of IDirectoryInfo) Implements IDirectoryInfo.GetDirectories
			Return directory.GetDirectories().Select(Function(d) New DirectoryInfoWrapper(d))
		End Function
	End Class
End Namespace